﻿@model IEnumerable<Common.Views.StatisticalView>
@if (Model.Count() > 0)
{
    <table>
    <tr>
        <th>Product Name</th>
        <th>Features</th>
        <th>Image</th>
        <th>Number of Faults</th>
    </tr>

@foreach (var item in Model)
{
<tr>
    <td>@Html.DisplayFor(modelItem => item.ProductName)
    </td>
    <td>
        @Html.DisplayFor(modelItem => item.Features)
    </td>
    <td>
        <img height="150px" width="150px" src= "@Url.Content(item.ImageLink)" alt="@Html.DisplayFor(modelItem => item.ImageLink)" />
    </td>
    <td>
        @Html.DisplayFor(modelItem => item.FaultNo)
    </td>
</tr>
}
</table>
}
else
{
    <br /> <div style="color:Red">@Html.Label("No products were found")</div>
}